﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Santa_sAdventure.View
{
    class SplitterSystem
    {
        private SplitterParticle[] particles;
        // Number of particles
        private const int MAX_PARTICLES = 10;

        public SplitterSystem(Vector2 a_systemModelStartPosition, int a_direction)
        {
            particles = new SplitterParticle[MAX_PARTICLES];

            for (int i = 0; i < MAX_PARTICLES; i++)
            {
                particles[i] = new SplitterParticle(i, a_systemModelStartPosition, a_direction);
            }
        }

        // Update
        internal void Update(float a_elapsedTimeSeconds)
        {
            for (int i = 0; i < MAX_PARTICLES; i++)
            {
                particles[i].Update(a_elapsedTimeSeconds);
            }
        }

        // Draw
        internal void Draw(SpriteBatch a_spriteBatch, Camera a_camera, Texture2D a_spark)
        {
            for (int i = 0; i < MAX_PARTICLES; i++)
            {
                particles[i].Draw(a_spriteBatch, a_camera, a_spark);
            }
        }
    }
}
